/*
 * @Author: 13558093597 277098906@qq.com
 * @Date: 2025-08-19 15:13:17
 * @LastEditors: 13558093597 277098906@qq.com
 * @LastEditTime: 2025-08-19 16:04:43
 * @FilePath: \mes_app\lib\views\mine\info.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mes_app/color/hex.dart';
import 'package:mes_app/utils/styles.dart';
import 'package:mes_app/views/mine/controller.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';

class MineInfoPage extends GetView<MineInfoController> {
  const MineInfoPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: HexColor(HexColor.colorF9f9),
      appBar: TDNavBar(
        title: '个人信息',
        titleColor: HexColor(HexColor.color3333),
        titleFontWeight: FontWeight.w700,
        titleFont: Font(size: StylesUtils.fontSize16.toInt(), lineHeight: 1),
        backgroundColor: HexColor(HexColor.colorFfff),
        screenAdaptation: true,
        useDefaultBack: true,
        useBorderStyle: true,
        titleMargin: 0,
        border: TDNavBarItemBorder(
          color: HexColor(HexColor.colorE9e9),
        ),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              margin: EdgeInsets.only(top: 10),
              child: TDCellGroup(
                style: TDCellStyle.cellStyle(context),
                cells: [
                  TDCell(
                    arrow: true,
                    title: '头像',
                    rightIconWidget: TDAvatar(
                      avatarUrl:
                          'https://img0.baidu.com/it/u=31630240,2165770441&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
                      avatarSize: 90,
                      radius: 0,
                      onTap: () {},
                    ),
                  ),
                  TDCell(
                    arrow: false,
                    title: '姓名',
                    note: '小白兔',
                  ),
                  TDCell(
                    arrow: true,
                    title: '手机号',
                  ),
                  TDCell(
                    arrow: true,
                    title: '修改密码',
                    showBottomBorder: false,
                  ),
                ],
              ),
            )
          ],
        ),
      ),
      bottomNavigationBar: SafeArea(
        bottom: true,
        child: Container(
          height: 80,
          color: Colors.white,
          alignment: Alignment.center,
          child: FractionallySizedBox(
            heightFactor: 0.6,
            widthFactor: 0.8,
            child: TDButton(
              text: '编辑',
              size: TDButtonSize.large,
              type: TDButtonType.outline,
              shape: TDButtonShape.rectangle,
              theme: TDButtonTheme.primary,
            ),
          ),
        ),
      ),
    );
  }
}
